package com.example.videoweb.service.impl;

import com.example.videoweb.dao.CollectionMapper;
import com.example.videoweb.domain.Collections;
import com.example.videoweb.service.CollectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CollectionServiceImpl implements CollectionService {

    @Autowired
    private CollectionMapper collectionMapper;

    @Override
    public boolean insert(Collections collection) {
        return collectionMapper.insert(collection) > 0;
    }

    @Override
    public boolean update(Collections collection) {
        return collectionMapper.update(collection) > 0;
    }

    @Override
    public Collections selectByPrimaryKey(Integer id) {
        return collectionMapper.selectByPrimaryKey(id);
    }
}
